package com.ruoyi.youtobe.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.youtobe.mapper.YoutobeVideoViewCountMapper;
import com.ruoyi.youtobe.domain.YoutobeVideoViewCount;
import com.ruoyi.youtobe.service.IYoutobeVideoViewCountService;

/**
 * Youtobe热播视频Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-16
 */
@Service
public class YoutobeVideoViewCountServiceImpl implements IYoutobeVideoViewCountService 
{
    @Autowired
    private YoutobeVideoViewCountMapper youtobeVideoViewCountMapper;

    /**
     * 查询Youtobe热播视频
     * 
     * @param id Youtobe热播视频主键
     * @return Youtobe热播视频
     */
    @Override
    public YoutobeVideoViewCount selectYoutobeVideoViewCountById(Long id)
    {
        return youtobeVideoViewCountMapper.selectYoutobeVideoViewCountById(id);
    }

    /**
     * 查询Youtobe热播视频列表
     * 
     * @param youtobeVideoViewCount Youtobe热播视频
     * @return Youtobe热播视频
     */
    @Override
    public List<YoutobeVideoViewCount> selectYoutobeVideoViewCountList(YoutobeVideoViewCount youtobeVideoViewCount)
    {
        return youtobeVideoViewCountMapper.selectYoutobeVideoViewCountList(youtobeVideoViewCount);
    }

    /**
     * 新增Youtobe热播视频
     * 
     * @param youtobeVideoViewCount Youtobe热播视频
     * @return 结果
     */
    @Override
    public int insertYoutobeVideoViewCount(YoutobeVideoViewCount youtobeVideoViewCount)
    {
        youtobeVideoViewCount.setCreateTime(DateUtils.getNowDate());
        return youtobeVideoViewCountMapper.insertYoutobeVideoViewCount(youtobeVideoViewCount);
    }

    /**
     * 修改Youtobe热播视频
     * 
     * @param youtobeVideoViewCount Youtobe热播视频
     * @return 结果
     */
    @Override
    public int updateYoutobeVideoViewCount(YoutobeVideoViewCount youtobeVideoViewCount)
    {
        youtobeVideoViewCount.setUpdateTime(DateUtils.getNowDate());
        return youtobeVideoViewCountMapper.updateYoutobeVideoViewCount(youtobeVideoViewCount);
    }

    /**
     * 批量删除Youtobe热播视频
     * 
     * @param ids 需要删除的Youtobe热播视频主键
     * @return 结果
     */
    @Override
    public int deleteYoutobeVideoViewCountByIds(Long[] ids)
    {
        return youtobeVideoViewCountMapper.deleteYoutobeVideoViewCountByIds(ids);
    }

    /**
     * 删除Youtobe热播视频信息
     * 
     * @param id Youtobe热播视频主键
     * @return 结果
     */
    @Override
    public int deleteYoutobeVideoViewCountById(Long id)
    {
        return youtobeVideoViewCountMapper.deleteYoutobeVideoViewCountById(id);
    }
}
